/**
 * Pseudo logger
 */
function Logger(){
	this.buffer="";
	this.level="";
	this.debug=function(str){
		try{
			if(this.level!="DEBUG") return;
			var d=document.getElementById("debug");
			if(!d){
				d=document.createElement("div");
				d.id="debug";
				document.getElementsByTagName("body")[0].appendChild(d);
			}
			var local="";
			try {(0)();} catch (e) {
				if(e.stack){
					local=e.stack.split("\n")[1].split("@");
					local=local[1]+" "+local[0];
				}
			}
			d.innerHTML+=this.buffer + local+" - " + str + "<br />";
			this.buffer="";
			d.style.display="block";
		}catch(e){
			this.buffer+=str + "<br />";
		}	
	};	
}